local skel = fk.CreateSkill {
  name = "lb_zero__mengyao_bannileike",
  max_branches_use_time = {
    ["up"] = { [Player.HistoryRound] = 1 },
    ["down"] = { [Player.HistoryRound] = 1 },
  }
}

Fk:loadTranslationTable {
  ["lb_zero__mengyao_bannileike"] = "班尼雷克",
  --[":lb_zero__mengyao_bannileike"] = "每回合限一次，你的体力值变化后，你可以摸两张牌。",
  [":lb_zero__mengyao_bannileike"] = "每回合各限一次，你的体力值增加或减少后，你可以摸两张牌。",

  ["#lb_zero__mengyao_bannileike"] = "班尼雷克：你可以摸两张牌",

  ["$lb_zero__mengyao_bannileike1"] = "",
  ["$lb_zero__mengyao_bannileike2"] = "",
}

skel:addEffect(fk.HpChanged, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and data.num ~= 0 and
    (
      (data.num > 0 and skel:withinBranchTimesLimit(player, "up", Player.HistoryRound)) or
      (data.num < 0 and skel:withinBranchTimesLimit(player, "down", Player.HistoryRound))
    )
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player, { skill_name = skel.name, prompt = "#lb_zero__mengyao_bannileike" })
  end,
  on_use = function(self, event, target, player, data)
    player:addSkillBranchUseHistory(skel.name, data.num > 0 and "up" or "down")
    player:drawCards(2, skel.name)
  end,
})

return skel
